package com.jhgsys.internal.workflow.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * 流程节点流向表 Entity
 *
 * @author fenghaijun
 * @date 2024-07-19 09:56:47
 */
@Data
@TableName("workflow_node_trans")
public class WorkflowNodeTrans implements Serializable {

    /**
     * 流程节点流向id
     */
    @TableId(value = "workflow_node_trans_id", type = IdType.ASSIGN_UUID)
    private String workflowNodeTransId;

    /**
     * 租户Id
     */
    @TableField("tenant_id")
    @NotNull(message = "{required}")
    private String tenantId;

    /**
     * 流程id
     */
    @TableField("workflow_id")
    @NotNull(message = "{required}")
    private String workflowId;

    /**
     * 上级节点id
     */
    @TableField("workflow_node_from_id")
    @NotNull(message = "{required}")
    private String workflowNodeFromId;

    /**
     * 下级节点id
     */
    @TableField("workflow_node_to_id")
    @NotNull(message = "{required}")
    private String workflowNodeToId;

    /**
     * 流动类型;1：正常  2：分支
     */
    @TableField("workflow_node_trans_flg")
    @Size(max = 2, message = "{noMoreThan}")
    private String workflowNodeTransFlg;

    /**
     * 流动条件;1：与或条件  2：并且条件
     */
    @TableField("workflow_node_trans_type")
    @Size(max = 2, message = "{noMoreThan}")
    private String workflowNodeTransType;

    /**
     * 分支优先级
     */
    @TableField("workflow_node_trans_order")
    private Integer workflowNodeTransOrder;

    /**
     * 流动描述
     */
    @TableField("workflow_node_trans_remark")
    @Size(max = 900, message = "{noMoreThan}")
    private String workflowNodeTransRemark;

    /**
     * 创建人
     */
    @TableField("created_by")
    @Size(max = 64, message = "{noMoreThan}")
    private String createdBy;

    /**
     * 创建时间
     */
    @TableField("created_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    /**
     * 更新人
     */
    @TableField("updated_by")
    @Size(max = 64, message = "{noMoreThan}")
    private String updatedBy;

    /**
     * 更新时间
     */
    @TableField("updated_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    /**
     * 删除人
     */
    @TableField("deleted_by")
    @Size(max = 64, message = "{noMoreThan}")
    private String deletedBy;

    /**
     * 删除时间
     */
    @TableField("deleted_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date deletedTime;

    /**
     * 删除标记
     */
    @TableField("deleted_flg")
    @Size(max = 1, message = "{noMoreThan}")
    private String deletedFlg;

}